package com.semp.jadoma.web.utils.webapp;

import com.semp.jadoma.core.model.Dog;

public class KeyFactory {

	/**
	 * peel to webapp key
	 * @param peel
	 * @return
	 */
	public final static String peelToKey(int peel) {
		if (peel == Dog.PeelType.BRUSH.getCode()) {
			return Keys.PEEL_BRUSH;
		}
		return Keys.PEEL_SHORT;
	}

	/**
	 * color to color key
	 * @param color
	 * @return
	 */
	public final static String colorToKey(int color) {
		if (color == Dog.ColorType.BLUE.getCode()) {
			return Keys.COLOR_BLUE;
		}
		if (color == Dog.ColorType.CHOCOLATE.getCode()) {
			return Keys.COLOR_CHOCOLATE;
		}
		return Keys.COLOR_DEER;
	}
	
	/**
	 * sex to sex key
	 * @param sex
	 * @return
	 */
	public final static String sexToKey(int sex) {
		if (sex == Dog.SexType.FEMALE.getCode()) {
			return Keys.SEX_FEMALE;
		}
		return Keys.SEX_MALE;
	}
}
